﻿@model Manager.Model.Admin.M_Opus

@{
    ViewBag.Title = "作品推荐";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
@section header{
<script language="javascript" type="text/javascript" src="@Url.Content("~/Scripts/My97DatePicker/WdatePicker.js")"></script>
<script type="text/javascript" src="@Url.Content("~/ueditor/editor_config.js")"></script>
<script type="text/javascript" src="@Url.Content("~/ueditor/editor_all.js")"></script>
<link rel="stylesheet" href="@Url.Content("~/ueditor/themes/default/ueditor.css")" />
}
<div class="nav">当前位置 :-> 作品推荐 :-> 添加作品</div>

@using (Html.BeginForm("Add", "Opus", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>作品信息</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.OpusName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OpusName)
            @Html.ValidationMessageFor(model => model.OpusName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.OpusDesc)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.OpusDesc)
            @Html.ValidationMessageFor(model => model.OpusDesc)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.OpusImage)
        </div>
        <div class="editor-field">
            <input type="file" style="width:200px" name="OpusImage" />
            @Html.ValidationMessageFor(model => model.OpusImage)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.OpusStylistID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.OpusStylistID, ViewBag.StylistSelect as IEnumerable<SelectListItem>)
            @Html.ValidationMessageFor(model => model.OpusStylistID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsValid)
        </div>
        <div class="editor-field">
            @Html.RadioButtonFor(model => model.IsValid, true, new { @id = "IsValid1", @checked = "true" })是
            @Html.RadioButtonFor(model => model.IsValid, false, new { @id = "IsValid2" })否
            @Html.ValidationMessageFor(model => model.IsValid)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsTop)
        </div>
        <div class="editor-field">
            @Html.RadioButtonFor(model => model.IsTop,true, new { @id="isTop1"})是
            @Html.RadioButtonFor(model => model.IsTop,false, new { @id = "isTop2",@checked="true" })否
            @Html.ValidationMessageFor(model => model.IsTop)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.OpusStylistDate)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.OpusStylistDate, new { onclick = "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" })
            @Html.ValidationMessageFor(model => model.OpusStylistDate)
        </div>

        <p>
            <input type="submit" value="添加" />
        </p>
    </fieldset>
}

<script type="text/javascript">
    var editorOption = {
        autoClearinitialContent: true
    };
    var editor = new baidu.editor.ui.Editor(editorOption);
    editor.render("OpusDesc");
</script>
<div>
    @Html.ActionLink("返回", "Index")
</div>

